#ifndef AGORA_IBuffer
# define AGORA_IBuffer


	
class IBuffer
{
public:
	virtual int Write(void *data, unsigned int size) = 0;
	virtual void*  Read(unsigned int size, bool delDataReaded = true) = 0;
	virtual void   Delete(unsigned int size) = 0;
	virtual unsigned int Size() = 0;
	virtual unsigned int SizeMax() = 0;
	virtual void Clean() = 0;
	virtual void SetEvent(bool status) = 0;
	typedef void (*ActOnBuffer)(IBuffer* data, void*);
	virtual void SubscribeEnoughData(ActOnBuffer function, unsigned int size, void *) = 0;
	virtual void UnsubscribeEnoughData(ActOnBuffer function, unsigned int size) = 0;
};

#endif